using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Pick<Data>:MonoBehaviour
{
    public Data data;
    protected bool isTrigger;


    public void pick()
    {
        Destroy(gameObject);
    }

    public void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.CompareTag(Tags.Player))
            isTrigger = true;
    }

    public void OnTriggerExit2D(Collider2D collision)
    {
        if (collision.gameObject.CompareTag(Tags.Player))
            isTrigger = false;
    }
}
